//
//  NetAPI.h
//  Coin
//
//  Created by yangy on 2018/6/27.
//  Copyright © 2018年 zzg. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger,BHNetworkRequestType)
{
    BHNetworkRequestTypeGET,
    BHNetworkRequestTypePOST
};

typedef void(^NAResponseSuccess)(id response);
typedef void(^NAResponseFail)(NSError *error);

#define ServerURL @"testapi.appleusdt.com"

@interface NetRequest : NSObject


+ (NetRequest*) sharedNetAPI;

+ (void) startMonitoring;

+ (NSURLSessionDataTask*) getWithUrl:(NSString*) url
            parameters:(id) parameters
               success:(NAResponseSuccess) success
                  fail:(NAResponseFail) fail
                             showHUD:(BOOL) showHUD;

+ (NSURLSessionDataTask*) postWithUrl:(NSString*) url
             parameters:(id) parameters
                success:(NAResponseSuccess) success
                   fail:(NAResponseFail) fail
                showHUD:(BOOL) showHUD includeParameterToURL:(BOOL) isInclude;


@end
